﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace Clmp.Data.DBEntity2.Sql
{
    public class SqlDataContainer : DataContainer
    {
        public SqlDataContainer(string connectionString)
            : base(new SqlClientFactory(), new SqlEntityServer(new SqlAttributesMapping()))
        {
            ConnectionString = connectionString;
        }
        /// <summary>
        /// 开启数据库事物
        /// </summary>
        /// <returns>事物处理对象</returns>
        public new SqlTransaction BeginTransaction()
        {
            return ((SqlConnection)DbConnection).BeginTransaction();
        }
    }
}
